]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Use just the counter to format notifications
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 29 Nov 2019 19:05:12 +0000 (16:05 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 10 Feb 2020 22:30:52 +0000 (22:30 +0000)
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872

js/ui/unlockDialog.js

index 2aaaf4de1bf083badc7985aab6da0f90e46cbda0..9335e015e92e195a18df4ccb8e1094838d2d749b 100644 (file)
@@ -71,13 +71,6 @@ var NotificationsBox = GObject.registerClass({
         this.visible = this._notificationBox.visible;
     }
 
-    _makeNotificationCountText(count, isChat) {
-        if (isChat)
-            return ngettext('%d new message', '%d new messages', count).format(count);
-        else
-            return ngettext('%d new notification', '%d new notifications', count).format(count);
-    }
-
     _makeNotificationSource(source, box) {
         let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
         box.add_child(sourceActor);
@@ -93,7 +86,7 @@ var NotificationsBox = GObject.registerClass({
 
         let count = source.unseenCount;
         let countLabel = new St.Label({
-            text: this._makeNotificationCountText(count, source.isChat),
+            text: `${count}`,
             style_class: 'unlock-dialog-notification-count-text',
         });
         textBox.add(countLabel);
@@ -239,7 +232,7 @@ var NotificationsBox = GObject.registerClass({
             this._showSource(source, obj, obj.sourceBox);
         } else {
             let count = source.unseenCount;
-            obj.countLabel.text = this._makeNotificationCountText(count, source.isChat);
+            obj.countLabel.text = `${count}`;
         }
 
         obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);